<?php /* Smarty version 2.6.18, created on 2010-03-09 17:06:15
         compiled from training.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'cycle', 'training.tpl', 36, false),)), $this); ?>
<div id="blanket" style="display:none;"></div>
<div id="editTraining" style="background-color:#fff;width:500px;z-index: 1002;display:none;position: absolute;">
</div>
<script>	
	var dd = new ekimo_drag_region("content","editTraining");
</script>
<div id="main_content">
    	<h1>Training List</h1>
        
			<div class="blue">
        	    <form action="" id="filterForm" >
        	        <table style="width: 100%">
        	            <tr align="right">
        					<td style="width: 100px">
								<input type="button" value="New Training" onclick="editTraining(0);"/>
        					</td>
        	            </tr>
        	        </table>
        	    </form>
        	</div>
            <div id="result">
				<div>
					<table border="0" width="100%">
					<tr><td colspan="5"><hr></td></tr>
					<tr>
						<?php if ($this->_tpl_vars['trainings'][0]['course_title'] <> ''): ?>
								<td align="center" style="padding-left: 5pt; padding-right: 5pt" width="80px">Edit</td>
						<?php endif; ?>
						<td width="300px">Training</td>
						<td width="300px">Skill</td>
						<td>Trainor</td>
						<td align="right">Training Date</td>
					</tr>
					<tr><td colspan="5"><hr></td></tr>
					<?php $_from = $this->_tpl_vars['trainings']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['training']):
?>
					<tr class="<?php echo smarty_function_cycle(array('values' => 'blue,notify'), $this);?>
">
						<?php if ($this->_tpl_vars['training']['course_title'] <> ''): ?>
							<td align="center">
							<a href="javascript:void(0);" onclick="editTraining('<?php echo $this->_tpl_vars['training']['training_id']; ?>
');" >Edit</a>
						</td>
						<?php endif; ?>
						<td><?php echo $this->_tpl_vars['training']['course_title']; ?>
</td>						
						<td><?php echo $this->_tpl_vars['training']['skill']; ?>
</td>
						<td><?php echo $this->_tpl_vars['training']['trainor']; ?>
</td>
						<td align="right"><?php echo $this->_tpl_vars['training']['date_training']; ?>
</td>
					</tr>
					<?php endforeach; endif; unset($_from); ?>
					</table>
				</div>
            </div><!-- results -->
            
</div>
<script language="javascript">
<?php echo '
	function editTraining(trainingId){
		doajaxAction("/account/editTraining/trainingId/"+trainingId,0,\'editTraining\');
		popup("editTraining");
	}
'; ?>

</script>